package com.zyj.pojo;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="t_room")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Room {
	private Integer id;
	private String roomcode;
	private String roomname;
	private String roompic;
	private Integer roombuilding;
	private Integer roomtype;
	private Integer parentid;
	
	private List<Asset> assetList;
	private List<Assetpetition> assetpetitionList;
	@Id
	@GeneratedValue(strategy=IDENTITY)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getRoomcode() {
		return roomcode;
	}
	public void setRoomcode(String roomcode) {
		this.roomcode = roomcode;
	}
	public String getRoomname() {
		return roomname;
	}
	public void setRoomname(String roomname) {
		this.roomname = roomname;
	}
	public String getRoompic() {
		return roompic;
	}
	public void setRoompic(String roompic) {
		this.roompic = roompic;
	}
	public Integer getRoombuilding() {
		return roombuilding;
	}
	public void setRoombuilding(Integer roombuilding) {
		this.roombuilding = roombuilding;
	}
	
	public Integer getRoomtype() {
		return roomtype;
	}
	public void setRoomtype(Integer roomtype) {
		this.roomtype = roomtype;
	}
	public Integer getParentid() {
		return parentid;
	}
	public void setParentid(Integer parentid) {
		this.parentid = parentid;
	}
	@OneToMany(mappedBy="room")
	public List<Asset> getAssetList() {
		return assetList;
	}
	public void setAssetList(List<Asset> assetList) {
		this.assetList = assetList;
	}
	@OneToMany(mappedBy="room")
	public List<Assetpetition> getAssetpetitionList() {
		return assetpetitionList;
	}
	public void setAssetpetitionList(List<Assetpetition> assetpetitionList) {
		this.assetpetitionList = assetpetitionList;
	}

}
